//
//  HHTweetCell.m
//  oschina
//
//  Created by hjl on 16/4/1.
//  Copyright © 2016年 hjl. All rights reserved.
//

#import "HHTweetCell.h"
#import "HHTweet.h"
#import <UIImageView+WebCache.h>
@interface HHTweetCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *commentCount;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@end


@implementation HHTweetCell

- (void)setTweet:(HHTweet *)tweet{
    
    _tweet = tweet;
    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:tweet.portrait]];
    self.nameLabel.text = tweet.author;
    self.contentLabel.text = tweet.body;
    self.timeLabel.text = tweet.pubDate;
    self.commentCount.text = tweet.commentCount;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
